#pragma once

#include "c99defs.hpp"
#include "json.h"

#ifdef __cplusplus
extern "C" {
#endif

	EXPORT char* LoadFileAsBytes(const char* path);
	EXPORT char* LoadFileAsBytesEX(const char* path,size_t & _size);
	EXPORT bool IsFileExist(const char* path);

	EXPORT bool WriteJsonFile(Json::Value const& root,const char*path);

	EXPORT void* cat_dlopen(const char* path);
	EXPORT void* cat_dlsym(void* module, const char* func);
	EXPORT void cat_dlclose(void* module);

	EXPORT size_t cat_utf8_to_wcs(const char* str, size_t len, wchar_t* dst,size_t dst_size);
#ifdef __cplusplus
}
#endif
